#pragma once
#include <iostream>
#include <boost/asio.hpp>
#include <map>
using namespace boost::asio::ip;
class Session;
class Server
{
public:
	Server(boost::asio::io_context& ioc, unsigned short port);
	void ClearSession(std::string uuid);
private:
	void start_accept();
	void handle_accept(std::shared_ptr<Session> session, const boost::system::error_code& ec);
	boost::asio::io_context& _ioc;
	unsigned short _port;
	tcp::acceptor _acceptor;
	std::map<const std::string, std::shared_ptr<Session>> _sessions;
};
